import { createApp } from 'vue'
import App from './App.vue'
const app=createApp(App)
//vuex
import store from '@/store/index'
//@ts-ignore
app.use<typeof store>(store)

//element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// @ts-ignore
app.use<typeof ElementPlus>(ElementPlus)

import router from '@/router/index'
app.use(router)

import '@/style/index.scss'

//main.ts
import 'virtual:svg-icons-register'

//vue-i18n
//https://vue-i18n.intlify.dev/
import {createI18n} from "vue-i18n";
const i18n=createI18n({
    locale:'en',
    // 如果要使用组合 API 模式，则需要将其设置为false
    // 在模板中使用占位符: {{$t('loginTxt')}}
    legacy:false,
    messages:{
        en: {
            loginTxt:'login',
            forgetTxt:'forget password?'
        },
        zh:{
            loginTxt:'登录',
            forgetTxt:'忘记密码?'
        }
    }
})

//@ts-ignore
app.use(i18n)
app.mount('#app')
